package cn.kgc.vue.controller;

import cn.kgc.vue.response.ResponseResult;
import cn.kgc.vue.service.MailService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 课工场
 * @date 2024/9/26
 * @description   邮件发送控制层
 */
@RestController
@RequestMapping("mail")
public class MailController {

    @Resource
    private MailService mailService;

    // 发送邮件
    @PostMapping("send/{to}")
    public ResponseResult sendMessage(@PathVariable("to") String to){

        return mailService.sendMessage(to);
    }


}
